<head>
<style>
#sample {
    -webkit-user-select: none;
    user-select: none;
}
</style>
</head>
<body>
<script src="../../../resources/js-test.js"></script>
<div id="container">
<p id="description"></p>
Manual step
<ol>
    <li>Click text input to focus it</li>
    <li>Hit Ctrl+A to select contents of text input</li>
</ol>
<input id="sample" value="foobar">
</div>
<script>
description('Tests user-select:none doesn\'t affect select()');
function $(id) { return document.getElementById(id); }

var sample = $('sample');
sample.focus();
sample.select();
shouldBe('sample.selectionStart', '0');
shouldBe('sample.selectionEnd', 'sample.value.length');

if (window.testRunner)
    $('container').outerHTML = '';
</script>
</body>
